package com.ruoyi.asset.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 资产状态历史记录对象 t_asset_status_history
 * 
 * @author ruoyi
 * @date 2025-01-21
 */
public class AssetStatusHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 资产编号 */
    @Excel(name = "资产编号")
    private String assetNo;

    /** 原状态编码 */
    @Excel(name = "原状态编码")
    private String oldStatusCode;

    /** 新状态编码 */
    @Excel(name = "新状态编码")
    private String newStatusCode;

    /** 状态变更原因 */
    @Excel(name = "状态变更原因")
    private String reason;

    /** 关联业务单号（报修单号、维修单号等） */
    @Excel(name = "关联业务单号")
    private String relatedBusinessNo;

    /** 业务类型（FAULT_REPORT-故障报修，WORK_ORDER-维修单，MANUAL-手动更新） */
    @Excel(name = "业务类型")
    private String businessType;

    /** 操作人ID */
    @Excel(name = "操作人ID")
    private Long operatorId;

    /** 操作人姓名 */
    @Excel(name = "操作人姓名")
    private String operatorName;

    /** 变更时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date changeTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setAssetNo(String assetNo) 
    {
        this.assetNo = assetNo;
    }

    public String getAssetNo() 
    {
        return assetNo;
    }

    public void setOldStatusCode(String oldStatusCode) 
    {
        this.oldStatusCode = oldStatusCode;
    }

    public String getOldStatusCode() 
    {
        return oldStatusCode;
    }

    public void setNewStatusCode(String newStatusCode) 
    {
        this.newStatusCode = newStatusCode;
    }

    public String getNewStatusCode() 
    {
        return newStatusCode;
    }

    public void setReason(String reason) 
    {
        this.reason = reason;
    }

    public String getReason() 
    {
        return reason;
    }

    public void setRelatedBusinessNo(String relatedBusinessNo) 
    {
        this.relatedBusinessNo = relatedBusinessNo;
    }

    public String getRelatedBusinessNo() 
    {
        return relatedBusinessNo;
    }

    public void setBusinessType(String businessType) 
    {
        this.businessType = businessType;
    }

    public String getBusinessType() 
    {
        return businessType;
    }

    public void setOperatorId(Long operatorId) 
    {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() 
    {
        return operatorId;
    }

    public void setOperatorName(String operatorName) 
    {
        this.operatorName = operatorName;
    }

    public String getOperatorName() 
    {
        return operatorName;
    }

    public void setChangeTime(Date changeTime) 
    {
        this.changeTime = changeTime;
    }

    public Date getChangeTime() 
    {
        return changeTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("assetNo", getAssetNo())
            .append("oldStatusCode", getOldStatusCode())
            .append("newStatusCode", getNewStatusCode())
            .append("reason", getReason())
            .append("relatedBusinessNo", getRelatedBusinessNo())
            .append("businessType", getBusinessType())
            .append("operatorId", getOperatorId())
            .append("operatorName", getOperatorName())
            .append("changeTime", getChangeTime())
            .toString();
    }
}
